//
//  HXLAnnotationView.m
//  On The Load
//
//  Created by 晓琳 on 15/11/17.
//  Copyright © 2015年 @@叶一闽. All rights reserved.
//

#import "HXLAnnotationView.h"
#import "HXLAnnotation.h"
@implementation HXLAnnotationView

+ (instancetype)myAnnoViewWithMapView:(MKMapView *)mapView
{
    static NSString * ID = @"myAnnoView";
    HXLAnnotationView * myAnnotation = (HXLAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:ID];
    if (myAnnotation == nil) {
        myAnnotation = [[HXLAnnotationView alloc] initWithAnnotation:nil reuseIdentifier:ID];
        myAnnotation.canShowCallout = YES;
    }
    return myAnnotation;
    
}
- (void)setAnnotation:(HXLAnnotation *)annotation
{
    self.image = [UIImage imageNamed:annotation.icon];
    [super setAnnotation:annotation];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
